<?php
/**
 * Created by PhpStorm.
 * User: yangwang
 * Date: 2024-04-26
 * Time: 14:41
 */

namespace App\Models\Cruise;


use App\Models\BaseModel;
use App\Models\Traits\KfSoftDeletes;
use App\Models\Traits\KfUid;
use Illuminate\Database\Eloquent\Relations\HasOne;

class CruiseShopLicenseRecordsLogModel extends BaseModel
{
    use KfUid;
    use KfSoftDeletes;

    protected $table = 'cruise_shop_license_records_log';

    protected $fillable = [
        'id',
        'shopId',
        'type',
        'operateType',
        'actionType',
        'remark',
        'createdAt',
        'createdByUid',
        'updatedAt',
        'updatedByUid',
        'isDeleted',
    ];

    /**
     * operateType
     */
    const OPERATE_TYPE_SYS      = 0;
    const OPERATE_TYPE_INNER    = 1;
    const OPERATE_TYPE_BACK     = 2;
    const OPERATE_TYPE_MERCHANT = 3;

    const OPERATE_TYPE_MAP = [
        self::OPERATE_TYPE_SYS      => '系统',
        self::OPERATE_TYPE_INNER    => '内部',
        self::OPERATE_TYPE_BACK     => '后台',
        self::OPERATE_TYPE_MERCHANT => '商家',
    ];

    /**
     * action_type
     */
    const ACTION_TYPE_CARD_EXPIRED   = 1;
    const ACTION_TYPE_AUDIT_APPROVED = 2;
    const ACTION_TYPE_AUDIT_REJECT   = 3;
    const ACTION_TYPE_CHANGE_INFO    = 4;

    const ACTION_TYPE_MAP = [
        self::ACTION_TYPE_AUDIT_APPROVED => '审核通过',
        self::ACTION_TYPE_AUDIT_REJECT   => '审核驳回',
        self::ACTION_TYPE_CHANGE_INFO    => '修改信息',
        self::ACTION_TYPE_CARD_EXPIRED   => '证件过期',
    ];

}